<%--
  Created by IntelliJ IDEA.
  User: cos
  Date: 2022/9/30
  Time: 16:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="page/head.jsp" %>
<html>
<head>
    <title>Title</title>
</head>


<body>
<div class="container">
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <form action="/book/updateBook?id=${b.id}" method="post">

                <div class="form-group">
                    <label for="ename">书名</label>
                    <input type="text" class="form-control" id="ename" name="name" value="${b.name}"
                           placeholder="书名">

                </div>

                <div class="form-group">
                    <label for="author">作者</label>
                    <input type="text" class="form-control" id="author" name="author" value="${b.author}"
                           placeholder="作者">
                </div>

                <div class="form-group">
                    <label for="publish">出版社</label>
                    <input type="text" class="form-control" id="publish" name="publish" value="${b.publish}"
                           placeholder="出版社">
                </div>

                <div class="form-group">
                    <label for="date">出版日期</label>
                    <input type="date" class="form-control" id="date" name="publishdate"
                           value="<fm:formatDate value='${b.publishdate}' pattern='yyyy-MM-dd'/>">
                </div>

                <div class="form-group">
                    <label for="pages">页数</label>
                    <input type="number" class="form-control" id="pages" name="page" value="${b.page}" placeholder="页数">
                </div>

                <div class="form-group">
                    <label for="price">价格</label>
                    <input type="text" class="form-control" id="price" name="price" value="${b.price}"
                           placeholder="价格">
                </div>


                <div class="form-group">
                    <label for="content">内容摘要</label>
                    <input type="text" class="form-control" id="content" name="content" value="${b.content}"
                           placeholder="内容摘要">
                </div>



                <button type="submit" class="btn btn-default" id="btn1" >修改</button>
            </form>
        </div>
    </div>
</div>
<script>
    $(function () {
        // $.ajax({
        //     url: "/dept/getAll",
        //     type: "get",
        //     dataType: "json",
        //     success: function (result) {
        //         var dno = $("#userdno").val();
        //         for (let x in result) {
        //             if (dno == result[x].dno) {
        //                 $("#dno").append("<option selected value='" + result[x].dno + "'>" + result[x].dname + "</option>")
        //             } else {
        //                 $("#dno").append("<option value='" + result[x].dno + "'>" + result[x].dname + "</option>")
        //             }
        //         }
        //     }
        // })

    })
</script>
</body>
</html>
